if (event.type() != Clutter.EventType.KEY_PRESS)
return false;
+ if (!sessionMode.allowKeybindingsWhenModal) {
+ if (modalCount > (overview.visible ? 1 : 0))
+ return false;
+ }
+
let symbol = event.get_key_symbol();
let keyCode = event.get_key_code();
let ignoredModifiers = global.display.get_ignored_modifier_mask();
// This relies on the fact that Clutter.ModifierType is the same as Gdk.ModifierType
let action = global.display.get_keybinding_action(keyCode, modifierState);
- // Other bindings are only available to the user session when the overview is up and
- // no modal dialog is present.
- if (sessionMode.sessionType == Shell.SessionType.USER && (!overview.visible || modalCount > 1))
- return false;
-
// This isn't a Meta.KeyBindingAction yet
if (symbol == Clutter.Super_L || symbol == Clutter.Super_R) {
overview.hide();
showCalendarEvents: false,
allowSettings: false,
allowExtensions: false,
+ allowKeybindingsWhenModal: true,
sessionType: Shell.SessionType.GDM },
'user': { hasOverview: true,
showCalendarEvents: true,
allowSettings: true,
allowExtensions: true,
+ allowKeybindingsWhenModal: false,
sessionType: Shell.SessionType.USER }
};